package com.ruge.common.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * 创建人 ：爱丽丝、如歌
 * 创建时间 ：2020-03-04  18:04
 * 描述 ：自定义异常
 */
@Getter
@Setter
public class RugeException extends RuntimeException{
    private static final long serialVersionUID = 1L;

    private String msg;
    private int code;

    public RugeException() {
        this.code = 500;
    }

    public RugeException(String msg,Throwable cause) {
        super(msg,cause);
        this.msg = msg;
    }

    public RugeException(String msg, int code) {
        super(msg);
        this.code = code;
    }

    public RugeException(String msg, int code,Throwable cause) {
        super(msg,cause);
        this.msg = msg;
        this.code = code;
    }
    public RugeException(String msg) {
        this.code = 500;
        this.msg = msg;
    }

}
